import React, { useEffect } from "react";
import HeaderOne from "../headers/header-one";
import Breadcrubs from "../common/widgets/breadcrubs";
import CopyRight from "../footers/common/copyright"
import CopyRightNor from "../footers/common/copyrightnor"
import TopBarXyc from "../headers/common/topBarXyc"

const CommonLayout = ({ children, title, parent, subTitle }) => {

  useEffect(()=>{
    console.log(title == "profile")
  })

  return (
    <>
      {/* <Helmet>
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <link rel="icon" type="image/x-icon" href={favicon ? favicon : ""} />
      </Helmet> */}
      <TopBarXyc></TopBarXyc>
      <Breadcrubs title={title} parent={parent} subTitle={subTitle} />
      <>{children}</>
      {
        (title !== "Product") &&
        (
          title !== "profile"?
          <CopyRightNor></CopyRightNor> :
          <CopyRight></CopyRight>
        )
      }
    </>
  );
};

export default CommonLayout;
